#include<bits/stdc++.h>
using namespace std;
int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
///////////////1  2  3   4  5  6  7 8  9 
bool check(int y)
{
  if((y%4==0&&y%100!=0)||y%400==0)
  {
    return true;
  }
  return false;
}

int main()
{
  long long tmp=0;
  int week=6;
  for(int y=2000;y<=2020;++y)
  {
    for(int m=1;m<=(y==2020?10:12);++m)
    {
      if(check(y))
      {
        day[2]=29;
      }
      else{
        day[2]=28;
      }
      for(int d=1;d<=(y==20);++d)
      {
        if(d==1||week==1)
          tmp+=2;
        else
          tmp++;
        if(week==7)
        	week=1;
        week++;
      }
    }
  }
  cout<<tmp;
  return 0;
}
